<template>
    <view class='page'>
        <u-navbar class="gradient-bg" title="资金明细" navbarType="0" fontColor="#ffffff" gradient="linear-gradient(to bottom right, #2e996f, #3f99ab)"></u-navbar>
        <view class="box1">
            <text class="center"> {{selectDictLabel(statusList,data.withdr_state)}}</text>
            <text class="center money">-{{data.with_amount}}</text>
            <view class="list">
                <!-- <view class="item">
                    <text>类型</text>
                    <text>收入</text>
                </view> -->
                <view class="item" v-if="data.withdr_state==0">
                    <text>申请提现时间</text>
                    <text>{{ data.submit_time }}</text>
                </view>
                <view class="item" v-else-if="data.withdr_state==1">
                    <text>审核成功时间</text>
                    <text>{{ data.success_time }}</text>
                </view>
                <view class="item" v-else-if="data.withdr_state==-1">
                    <text>审核拒绝时间</text>
                    <text>{{ data.fail_time }}</text>
                </view>
                <view class="item">
                    <text>交易单号</text>
                    <text>{{ data.order_no }}</text>
                </view>
                <view class="item">
                    <text>余额</text>
                    <text>{{data.staff_remain_amount}}</text>
                </view>
            </view>
        </view>
    </view>
</template>
<script>
import { getWithInfo } from "@/api/withdrawal.js"
import { withdrawalStatus } from "@/api/dictionary.js"
export default {
    components: {},
    data() {
        return {
            id: '',
            statusList: withdrawalStatus,
            data: {}
        };
    },
    onLoad(query) {
        if (query) {
            this.id = query.id
            this.getList()
        }
    },
    methods: {
        getList() {
            getWithInfo({ with_id: this.id }).then(res => {
                this.data = res.data
            })
        },
    },
};
</script>
<style scoped lang='scss'>
.box1 {
  width: 730rpx;
  background-color: #ffffff;
  border-radius: 10rpx;
  margin: 10rpx auto 0;
  padding: 30rpx 0;
  text {
    font-size: 28rpx;
    color: #525252;
  }
  .center {
    display: block;
    text-align: center;
  }
  .money {
    font-size: 48rpx;
    color: #525252;
    padding: 44rpx 0 120rpx;
  }
  .list {
    width: 90%;
    margin: 0 auto;
    .item {
      display: flex;
      padding-bottom: 30rpx;
      justify-content: space-between;
      text {
        font-size: 24rpx;
        color: #525252;
      }
      text:nth-child(2) {
        width: 71%;
        color: #999;
      }
    }
  }
}
</style>